package org.fly.api.demo.controller;

import cn.dev33.satoken.annotation.SaIgnore;
import org.fly.api.common.core.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Blue
 * @date 2023/12/12
 */
@RestController
@SaIgnore
@RequestMapping("/api/xss")
public class TestXssController {


    /**
     * http://localhost:8888/api/xss/clear?name=<script>alert(111)</script>
     *  这里选择的清空模式
     * @param name
     * @return {@link R}<{@link String}>
     */
    @GetMapping("/clear")
    public R<String> clearXss(String name){
        return R.ok(name);
    }
}
